Skip to content

gh-148675: Add Zd/Zf formats to array, ctypes, memoryview, struct#148676

Draft
vstinner wants to merge 6 commits intopython:mainfrom
vstinner:complex_formats
Draft

gh-148675: Add Zd/Zf formats to array, ctypes, memoryview, struct#148676
vstinner wants to merge 6 commits intopython:mainfrom
vstinner:complex_formats

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Apr 17, 2026

@vstinner

This comment was marked as outdated.

@vstinner
Copy link
Copy Markdown
Member Author

array.typecodes is a string with all available type codes. I added Zf and Zd to this string, but "Z" in array.typecodes is now true which is a bug.

Maybe array.typecodes string should be converted to a tuple?

>>> import array
>>> array.typecodes
'bBuwhHiIlLqQefdFDZfZd'
>>> "Z" in array.typecodes
True
>>> list(array.typecodes)
['b', 'B', 'u', 'w', 'h', 'H', 'i', 'I', 'l', 'L', 'q', 'Q', 'e', 'f', 'd', 'F', 'D', 'Z', 'f', 'Z', 'd']

Comment thread Modules/_ctypes/cfield.c Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants